<nz-table #dataTable nzShowSizeChanger [nzFrontPagination]="false" [nzData]="data" [nzLoading]="loading"
  [nzTotal]="total" [(nzPageIndex)]="pageIndex" [(nzPageSize)]="pageSize" (nzPageIndexChange)="getTableData()"
  (nzPageSizeChange)="getTableData(true)" class="table-select">
  <thead>
    <tr>
      <th nzShowCheckbox></th>
      <ng-container *ngFor="let thead of theads">
        <th>{{ thead }}</th>
      </ng-container>
    </tr>
  </thead>
  <tbody>
    <tr *ngFor="let data of dataTable.data">
      <ng-container *ngIf="title === '组件'">
        <td nzShowCheckbox></td>
        <td>{{ data.artifactName }}-{{data.version}}</td>
        <td>{{ data.grade }}</td>
        <td>{{ data.releaseDate | date: 'yyyy:MM:dd hh:mm:ss' }}</td>
        <td>{{ data.latestReleaseDate | date:'yyyy:MM:dd hh:mm:ss'}}</td>
        <td>{{ data.latestVersion }}</td>
        <td>{{ data.licenseId | noData}}</td>
      </ng-container>
      <ng-container *ngIf="title === 'License'">
        <td nzShowCheckbox></td>
        <td>{{ data.name }}</td>
        <td>{{ data.isOsiApproved }}</td>
        <td>{{ data.isDeprecatedLicenseId }}</td>
        <td>{{ data.reference }}</td>
        <td>{{ data.referenceNumber }}</td>
        <td>{{ data.detailsUrl }}</td>
      </ng-container>
      <ng-container *ngIf="title === 'cve'">
        <td nzShowCheckbox></td>
        <td>{{ data.name }}</td>
        <td>{{ data.score }}</td>
        <td>{{ data.availabilityImpact }}</td>
        <td>{{ data.accessVector }}</td>
        <td>{{ data.accessComplexity }}</td>
        <td>{{ data.confidentialityImpact }}</td>
        <td>{{ data.integrityImpact }}</td>
        <td>
          <button nz-button nzType="primary" (click)="createComponentModal(data.name)">添加关联</button>
        </td>
      </ng-container>
      <ng-container *ngIf="title === 'cnnvd'">
        <td nzShowCheckbox></td>
        <td>{{ data.name }}</td>
        <td>{{ data.cnnvdId }}</td>
        <td>{{ data.publishedDate }}</td>
        <td>{{ data.source | noData}}</td>
        <td>{{ data.severity }}</td>
        <td>{{ data.vulnType }}</td>
        <td>{{ data.thrtype }}</td>
        <td>{{ data.vulnDescript | textEllipsis}}</td>
        <td>{{ data.cveId }}</td>
        <td>{{ data.vulnSolution | textEllipsis}}</td>
      </ng-container>
      <ng-container *ngIf="title === '容器基线'">
        <td nzShowCheckbox></td>
        <td>{{ data.name }}</td>
        <td>{{ data.version }}</td>
        <td>{{ data.source }}</td>
        <td>{{ data.cves }}</td>
        <td>{{ data.cnnvds }}</td>
        <td>
          <button nz-button nzType="primary" (click)="openComponent(data.containerUuid)">基线详情</button>
        </td>
      </ng-container>
    </tr>
  </tbody>
</nz-table>